﻿

namespace GameServer.Common
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public delegate void SingleParameteredDelegate_String(string s);
    public delegate void ZeroParameteredDelegate();

    public class ParameteredDelegateData
    {
        public Delegate functionDelegate;
        public object[] parameters;

        public ParameteredDelegateData(Delegate d, params object[] parameters)
        {
            functionDelegate = d;
            this.parameters = parameters;
        }

        public void Invoke()
        {
            Console.WriteLine(parameters.ToString());
            functionDelegate.DynamicInvoke(parameters);
        }
    }
}
